package com.greenzebras.geocache.cachedata;

import java.io.Serializable;

import com.google.android.maps.GeoPoint;

public class CacheCoordinate implements Serializable{

	private static final long serialVersionUID = -8210776761379457107L;

	private int DEFAULT_POINT_COORDINATE = 0;
	
	private Integer latitude;
	private Integer longitude;

	public CacheCoordinate() {
		latitude = DEFAULT_POINT_COORDINATE;
		longitude = DEFAULT_POINT_COORDINATE;
	}

	public CacheCoordinate(Integer latitude, Integer longitude) {
		this.latitude = latitude;
		this.longitude = longitude;
	}

	public GeoPoint getGeoPoint() {
		return new GeoPoint(latitude, longitude);
	}

	public void setGeoPoint(GeoPoint geoPoint) {
		this.latitude = geoPoint.getLatitudeE6();
		this.longitude = geoPoint.getLongitudeE6();
	}
}
